import request from '@/utils/request'
import { getUserInfo } from "@/utils/auth"

// 列表查询
export async function reportPageList (params) {
  return window.globalRequest('/api/im/customBigScreen/query', {
    method: 'POST',
    prefix: '/religion',
    body: {...params},
  })
}

// 新增大屏设计
export async function addBigscreen(params) {
  return window.globalRequest('/api/im/customBigScreen/add', {
    method: 'POST',
    prefix: '/religion',
    body: params,
  })
}

// 修改大屏设计
export async function editBigscreen(params) {
  return window.globalRequest('/api/im/customBigScreen/update', {
    method: 'POST',
    prefix: '/religion',
    body: params,
  })
}

// 预览、查询大屏详情
export async function detailDashboard(lgc_sn) {
  return window.globalRequest(`/api/im/customBigScreen/detail/${lgc_sn}`, {
    method: 'GET',
    prefix: '/religion',
  })
}

// 组件自定义接口调用
export async function queryEchartsData({url,dataMethod,dataParams}) {
  return window.globalRequest({
    url,
    method: dataMethod,
    body: {
      prov_cd: getUserInfo().prov_cd,
      city_cd: getUserInfo().city_cd,
      zon_cd: getUserInfo().zon_cd,
      ...dataParams
    },
  })
}

// 查询气泡地图数据
export async function fetchStatisInfo(params) {
  return window.globalRequest('/api/sa/site_num_rslt/search', {
    method: 'POST',
    prefix: '/religion',
    body: {
      ...params,
    },
  });
}

// 地图坐标点数据
export async function queryRlgJson(params) {
  return window.globalRequest('/api/im/hunan/queryDTinfo', {
    method: 'POST',
    prefix: '/rlg-ras-huninfo',
    body: {
      ...params,
    },
  });
}



